In Ethernet technologies, each port of a core switch cascades to multiple host computers (physical machines). Moreover, the core switch generally operates in full duplex mode. That is, the core switch can simultaneously connect many pairs of ports, enabling each pair of mutually communicating physical machines to transmit data without conflict as though they were each monopolizing the communications media.
One or more number of virtual machines may be actualized on each physical machine. Each virtual machine has a pre-assigned Internet Protocol (IP) address and a pre-assigned machine access control (MAC) address. The core switch may store a MAC address table that includes data that specifies the correspondence between each port of the core switch and each MAC address associated with a virtual machine. The core switch passes communication between various virtual machines based on the stored MAC address table.
When a packet is received at the core switch from a sender (a first physical machine), the core switch uses the MAC address table to determine the port that corresponds to the destination MAC address that is included in the packet and sends the packet to the receiver (a second physical machine) that is connected to this port. When the second physical machine receives the packet, the incoming packet, from the core switch, the second physical machine forwards the incoming packet based on the destination MAC address included in the incoming packet to the virtual machine that is associated with that corresponding MAC address.
Similarly, when a physical machine receives a packet, an outgoing packet, from a virtual machine, the physical machine forwards this outgoing packet to the core switch. Then the core switch again forwards the packet to the corresponding destination physical machine according to the stored MAC address table.
However, the capacity of the core switch's MAC address table is limited. As the quantity of virtual machines increases in cloud computing environments, the limited capacities of core machine MAC address tables may no longer be able to accommodate more virtual machines.
In order to increase the use of virtual machines and without replacing hardware associated with the core switch, MAC network address translation (NAT)-based forwarding of Ethernet packets may be used. This technique assigns one common MAC address to a number of different virtual machines (which have different local MAC addresses and IP addresses). This common MAC address that is assigned to multiple different virtual machines is called a “global MAC address.” Moreover, one look-up table that stores correspondences between each global MAC address and its corresponding virtual machine IP addresses and local MAC addresses is maintained on each physical machine.
When a packet (e.g., an outgoing packet), is received from a virtual machine at the physical machine on which the virtual machine is running, the physical machine uses the origin IP address in the packet as a basis for looking up in the look-up table the global MAC address that corresponds to this IP address, and the physical machine substitutes the found global MAC address for the origin MAC address in the packet. The physical machine then forwards the packet to the core switch. Similarly, when a packet (e.g., an incoming packet), is received at a physical machine from the core switch, the physical machine uses the destination IP address in the packet as a basis for looking up in the look-up table the local MAC address corresponding to this IP address. For example, the physical machine may compare the destination IP address in the packet to the IP address associated with each virtual machine in the look-up table until a matching IP address is found. Then the physical machine must determine a local MAC address and a global MAC address that correspond to the matching IP address. Next, the physical machine substitutes the local MAC address corresponding to the matching IP address for the destination MAC address in the packet and forwards it to the virtual machine associated with this local MAC address. Because the MAC address table stored by the core switch needs only to record global MAC addresses and because one global MAC address can correspond to the local MAC addresses of multiple virtual machines, this technique reduces the amount of data needed to be stored in the MAC address table maintained by the core switch and therefore, more virtual machines may be supported.
However, although the use of the MAC network address translation technique can reduce the size of MAC address tables stored by core switches, the MAC network address translation technique is relatively slow and is inefficient at forwarding Ethernet packets.